package com.huangguolin.cloud.api.Catalogue.repositity;

import com.huangguolin.cloud.api.Catalogue.entity.ApiCatalogueSearchEntity;
import com.huangguolin.cloud.api.role.entity.ApiRoleSearchEntity;
import com.huangguolin.cloud.mybatis.entity.PtCatalogueEntity;
import com.huangguolin.cloud.mybatis.entity.PtRoleEntity;
import com.huangguolin.cloud.mybatis.flexigrid.PagingEntity;
import com.huangguolin.cloud.mybatis.ztree.ZtreeEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ApiCatalogueDao {
//    List<PtCatalogueEntity> queryCatalogueList(@Param("entity") ApiCatalogueSearchEntity entity, @Param("paging")PagingEntity paging);
    List<PtCatalogueEntity> queryCatalogueList(@Param("entity") ApiCatalogueSearchEntity entity);
    Integer queryCatalogueTotal( @Param("entity") ApiCatalogueSearchEntity entity);

    /**
     * 查询
     * @return
     */
    List<ZtreeEntity> queryMenuZtreeAll();

    /**
     * 插入章节
     * @param pid
     * @param name
     * @param sort
     * @return
     */
    boolean insertChapter(@Param("pid")String pid,@Param("name")String name,@Param("sort")String sort);
    /**
     * 插入章
     * @param pid
     * @param name
     * @param sort
     * @return
     */
    boolean insert(@Param("pid")String pid,@Param("name")String name,@Param("sort")String sort);

    /**
     * 删除章节
     * @param userIdArray
     */
    void deleteUser(@Param("userIdArray")String[] userIdArray);

    /**
     * 增加课程
     * @param className
     * @param picture
     * @param classType
     * @param radio
     * @param courseIntroduction
     * @return
     */
    boolean addCourse(@Param("className")String className, @Param("picture")String picture, @Param("classType")String classType, @Param("radio")String radio, @Param("courseIntroduction")String courseIntroduction);

    /**
     * 修改课程
     * @param id
     * @param className
     * @param picture
     * @param classType
     * @param radio
     * @param courseIntroduction
     * @return
     */
    boolean revise(@Param("id")String id,@Param("className")String className, @Param("picture")String picture, @Param("classType")String classType, @Param("radio")String radio, @Param("courseIntroduction")String courseIntroduction);
}
